<?php if($search):?>
<h2>查询绩效工资考核系数信息</h2>
<?php else:?>
<h2>修改绩效工资考核系数信息</h2>
<?php endif?>
<?php echo CHtml::beginForm(array($search?'search':'admin'),'post');?>
<table  style="margin: 0 auto;"  width="1210">
<tr><td>
	车号：<input type="text" name="keys[trucks.plate_no]" size="7" value="<?php echo isset($_GET['keys']['trucks.plate_no'])?$_GET['keys']['trucks.plate_no']:'';?>"/>
	车型：<input type="text" name="keys[tti.type_name]" size="7" value="<?php echo isset($_GET['keys']['tti.type_name'])?$_GET['keys']['tti.type_name']:'';?>"/>
	类别：<?php echo CHtml::dropDownList('keys[merit_pay_ratio.kind]', isset($_GET['keys']['merit_pay_ratio.kind'])?$_GET['keys']['merit_pay_ratio.kind']:'', array(''=>'全部','0'=>'A类','1'=>'B类','2'=>'C类','3'=>'D类','4'=>'E类'));?>
	有效时间：<input type="text" id="keys[s_date]" name="keys[s_date]" size="7" value="<?php echo isset($_GET['keys']['s_date'])?$_GET['keys']['s_date']:'';?>"/>
	<?php $this->widget('application.extensions.calendar.SCalendar',array('inputField'=>'keys[s_date]','ifFormat'=>'%Y-%m'));?> 
	模糊查询：<input type="radio" name="keys[blur]" value="1" checked/>是  
	<input type="radio" name="keys[blur]" value="0" <?php echo isset($_GET['keys']['blur'])&&$_GET['keys']['blur']==0?'checked':'';?>/>否 
	<input type="submit" value="搜索"/>
</td></tr></table>
<?php echo CHtml::endForm();?>
<table class="dataGrid"  width="1100">
  <thead>
  <tr>
    <th width="100"><?php echo $sort->link('plate_no'); ?></th>
    <th width="50"><?php echo $sort->link('kind'); ?></th>
    <th width="70"><?php echo $sort->link('effect_date'); ?></th>
    <th width="70"><?php echo $sort->link('lapse_date'); ?></th>
    <th width="70"><?php echo $sort->link('a_profit_min'); ?></th>
    <th width="70"><?php echo $sort->link('a_profit_max'); ?></th>
    <th width="50"><?php echo $sort->link('a_ratio'); ?></th>
    <th width="60"><?php echo $sort->link('b_profit_min'); ?></th>
    <th width="70"><?php echo $sort->link('b_profit_max'); ?></th>
    <th width="50"><?php echo $sort->link('b_ratio'); ?></th>
    <th width="70"><?php echo $sort->link('c_profit_min'); ?></th>
    <th width="70"><?php echo $sort->link('c_profit_max'); ?></th>
    <th width="50"><?php echo $sort->link('c_ratio'); ?></th>
    <th width="70"><?php echo $sort->link('d_profit_min'); ?></th>
    <th width="70"><?php echo $sort->link('d_profit_max'); ?></th>
    <th width="50"><?php echo $sort->link('d_ratio'); ?></th>
	<?php if(!$search):?><th width="70">操作</th><?php endif ?>
  </tr>
  </thead>
  <tbody>
<?php foreach($models as $n=>$model): ?>
  <tr class="<?php echo $n%2?'even':'odd';?>">
     <?php 
    	$url=array('show','id'=>$model->id)+$_GET;//把所有参数包括页码、查询参数传入显示信息页面
    	$url['ret']=$search?'search':'admin';
    ?>
    <td><?php echo CHtml::link($model->plate_no,$url); ?></td>
    <td><?php echo CHtml::encode($model->getKindName($model->kind)); ?></td>
    <td><?php echo CHtml::encode(substr($model->effect_date,0,7)); ?></td>
    <td><?php echo CHtml::encode(substr($model->lapse_date,0,7)); ?></td>
    <td><?php echo CHtml::encode($model->a_profit_min); ?></td>
    <td><?php echo CHtml::encode($model->a_profit_max); ?></td>
    <td><?php echo CHtml::encode(($model->a_ratio*100).'%'); ?></td>
    <td><?php echo CHtml::encode($model->b_profit_min); ?></td>
    <td><?php echo CHtml::encode($model->b_profit_max); ?></td>
    <td><?php echo CHtml::encode(($model->b_ratio*100).'%'); ?></td>
    <td><?php echo CHtml::encode($model->c_profit_min); ?></td>
    <td><?php echo CHtml::encode($model->c_profit_max); ?></td>
    <td><?php echo CHtml::encode(($model->c_ratio*100).'%'); ?></td>
    <td><?php echo CHtml::encode($model->d_profit_min); ?></td>
    <td><?php echo CHtml::encode($model->d_profit_max); ?></td>
    <td><?php echo CHtml::encode(($model->d_ratio*100).'%'); ?></td>
    <?php if(!$search):?>
    <td>
      <?php echo CHtml::link('修改',array('update','id'=>$model->id)+$_GET); ?>
     <?php echo CHtml::link('删除',array('delete','id'=>$model->id)+$_GET,array('confirm'=>"确定要删除 车号{$model->plate_no} 车型{$model->type} 的绩效考核系数信息吗？")); ?>
	</td>
	<?php endif ?>
  </tr>
<?php endforeach; ?>
  </tbody>
</table>
<br/>
<?php $this->widget('CLinkPager',array('pages'=>$pages,'htmlOptions'=>array('style'=>'width:1210px;'))); ?>
